<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Grid网格布局-小米商城左侧二级滑动菜单</title>
    <link rel="stylesheet" href="./css/reset.css" />
    <style>
      body {
        background-image: linear-gradient(to right, skyblue, #fff);
      }

      a {
        text-decoration: none;
      }

      .menu {
        width: 233px;
        height: 420px;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 20px 0px;
        margin: 50px 0px 0px 50px;
        position: relative;
      }

      .menu .item {
        font-size: 14px;
        height: 42px;
        padding-left: 30px;
        line-height: 42px;
        color: #fff;
        background: url(images/right-jiantou.png) no-repeat 200px 10px;
        cursor: pointer;
      }

      .menu .item:hover {
        background-color: #ff6700;
        background-image: url(images/right-jiantou2.png);
      }

      .menu .item a {
        color: #fff;
        font-size: 14px;
        display: block;
        /* height: 42px; */
        /* text-indent: 2em; */
        /* padding-left: 30px; */
        /* line-height: 42px; */
      }

      .menu .item .nav {
        /* height: 418px; */
        height: 460px;
        /* min-width: 250px; */
        background-color: #fff;
        border: 1px solid #666;
        position: absolute;
        left: 230px;
        top: 0px;
        display: grid;
        grid-template-rows: repeat(6, 1fr);
        /* grid-template-columns: 250px; */
        grid-auto-flow: column;
        grid-auto-columns: 250px;
        padding: 20px;
        display: none;
        box-sizing: border-box;
      }

      .menu .item .nav a {
        height: auto;
        color: #000;
        /* border:1px solid red; */
        display: flex;
        align-items: center;
      }

      .menu .item .nav a img {
        margin-right: 10px;
      }

      .menu .item .nav a:hover {
        color: #ff6700;
      }

      .menu .item:hover .nav {
        display: grid;
      }
    </style>
  </head>
  <body>
    <div class="menu">
      <div class="item">
        <a href="#">手机</a>
        <div class="nav">
          <a href="#">
            <img src="images/grid-mi-01.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-02.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-03.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-04.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-05.webp" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-06.webp" width="40" alt="image" />
            Redmi K40S
          </a>
          <a href="#">
            <img src="images/grid-mi-07.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-08.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-09.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-10.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-11.webp" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-12.webp" width="40" alt="image" />
            Redmi K40S
          </a>
          <a href="#">
            <img src="images/grid-mi-01.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-02.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-03.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-04.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-05.webp" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-06.webp" width="40" alt="image" />
            Redmi K40S
          </a>
          <a href="#">
            <img src="images/grid-mi-07.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-08.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-09.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-10.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-11.webp" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-12.webp" width="40" alt="image" />
            Redmi K40S
          </a>
        </div>
      </div>
      <div class="item">
        <a href="#">电视</a>
        <div class="nav">
          <a href="#">
            <img src="images/grid-mi-a1.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-a2.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-a3.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-a4.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-a5.webp" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-a6.webp" width="40" alt="image" />
            Redmi K40S
          </a>
          <a href="#">
            <img src="images/grid-mi-a7.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-a1.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-a2.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-a3.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-a4.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-a5.webp" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-a6.webp" width="40" alt="image" />
            Redmi K40S
          </a>
          <a href="#">
            <img src="images/grid-mi-a7.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
        </div>
      </div>
      <div class="item">
        <a href="#">笔记本 平板</a>
        <div class="nav">
          <a href="#">
            <img src="images/grid-mi-c01.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-c01.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-c01.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-c01.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-c01.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-c01.webp" width="40" alt="image" />
            Redmi 10A
          </a>
        </div>
      </div>
      <div class="item">
        <a href="#">家电</a>
        <div class="nav">
          <a href="#">
            <img src="images/grid-mi-b1.webp" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-b2.webp" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-b3.webp" width="40" alt="image" />
            Redmi 10A
          </a>
          <a href="#">
            <img src="images/grid-mi-b4.webp" width="40" alt="image" />
            Redmi K50 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-b5.jpg" width="40" alt="image" />
            Redmi K50
          </a>
          <a href="#">
            <img src="images/grid-mi-b6.jpg" width="40" alt="image" />
            Redmi K40S
          </a>
          <a href="#">
            <img src="images/grid-mi-b7.jpg" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-b8.jpg" width="40" alt="image" />
            黑鲨5 Pro
          </a>
          <a href="#">
            <img src="images/grid-mi-b9.jpg" width="40" alt="image" />
            黑鲨5
          </a>
          <a href="#">
            <img src="images/grid-mi-b10.jpg" width="40" alt="image" />
            Redmi 10A
          </a>
        </div>
      </div>
      <div class="item"><a href="#">出行 穿戴</a></div>
      <div class="item"><a href="#">智能 路由器</a></div>
      <div class="item"><a href="#">电源 配件</a></div>
      <div class="item"><a href="#">健康 儿童</a></div>
      <div class="item"><a href="#">耳机 音箱</a></div>
      <div class="item"><a href="#">生活 箱包</a></div>
    </div>
  </body>
</html>
